var gl_vue_vm_list_radio_html = $('#vue_vm_list_radio').html();

$(function() {
	$('#vue_vm_list div').hide();
	$('#vue_vm_list_radio div').hide();
	$('#elderWalletId').val('');
});

function elderWallet_find() {
	if($('#vue_vm_list_radio').length==0) {return;}
	$('#vue_vm_list_radio div').hide();
	
	var searchVal = $('#searchVal').val();
	if(isEmpty(searchVal)) {
		searchVal = $.url().param('searchVal');
	}
	
	find_basic_by_json(path+'/elderWallet/find', {searchVal: searchVal}, function(response) {
		$('#vue_vm_list_radio').html(gl_vue_vm_list_radio_html);
		
		new Vue({
			el: '#vue_vm_list_radio',
			data: {
				todos: response.data
			},
			methods: {
				getChepingUrl:function(elderId, elderName, elderCardId) {
					return getChepingUrl(elderId, elderName, elderCardId);
				},
				onFindElderChange:function(elderCardId) {
					if(findElder) {
						findElder(elderCardId);
					}
				},
				onRadioClick:function() {
					var elderWalletId = $('input:radio[name="elderWalletId"]:checked').attr('elderWalletId');
					$('#elderWalletId').val(elderWalletId);
				}
			}
		});
		
		$('#vue_vm_list_radio div').show();
	});
}